//
//  ViewModel.h
//  ECERP.CRM
//
//  Created by 刘思麟 on 2018/11/5.
//  Copyright © 2018 Mac. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^ReturnValueBlock)(id);
typedef void(^ErrorCodeBlock)(id);
typedef void(^FailureBlock)(id);

@interface ViewModel : NSObject

@property (copy, nonatomic) ReturnValueBlock returnBlock;
@property (copy, nonatomic) ErrorCodeBlock errorBlock;
@property (copy, nonatomic) FailureBlock failureBlock;

// 传入交互的Block块
-(void) setBlockWithReturnBlock: (ReturnValueBlock) returnBlock
                 WithErrorBlock: (ErrorCodeBlock) errorBlock
               WithFailureBlock: (FailureBlock) failureBlock;
@end

NS_ASSUME_NONNULL_END
